{template 'public/header'}

{template 'public/comhead'}

<link rel="stylesheet" type="text/css" href="../addons/yzzc_sun/template/public/ygcss.css">

<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>
    <li class="active"><a href="javascript:void(0);">预订下单</a></li>
    <li><a href="{php echo $this->createWebUrl('order');}"><i class="fa fa-refresh"></i>返回订单列表</a></li>
</ul>
<div class="main ygmain">
    <form  method="post" class="form-horizontal form" enctype="multipart/form-data" >
        <input type="hidden" name="c" value="site" />
        <input type="hidden" name="a" value="entry" />
        <input type="hidden" name="m" value="yzzc_sun" />
        <input type="hidden" name="do" value="order" />
        <input type="hidden" name="op" value="booking" />
        <div class="panel panel-default ygdefault">
                <div class="panel-heading wyheader">
                    预订下单
                </div>
                <div class="panel-body">
                    <div class="form-group">
                        <label  class="col-xs-12 col-sm-3 col-md-2 control-label">是否自有</label>
                        <div class="col-sm-10">
                            <label class="radio-inline">
                                <input onchange="check(this)" checked id="is_inner1" type="radio" name="is_inner" value="1"  />
                                <label for="is_inner1">自有</label>
                            </label>
                            <label class="radio-inline">
                                <input onchange="check(this)" id="is_inner2" type="radio"  name="is_inner" value="2" />
                                <label for="is_inner2">外调</label>
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-xs-12 col-sm-3 col-md-2 control-label">送车类型</label>
                        <div class="col-sm-10">
                            <label class="radio-inline">
                                <input checked id="gettype1" type="radio" name="gettype" value="1"  />
                                <label for="gettype1">门店自取</label>
                            </label>
                            <label class="radio-inline">
                                <input id="gettype2" type="radio"  name="gettype" value="2" />
                                <label for="gettype2">送车上门</label>
                            </label>
                        </div>
                    </div>
                    <div class="form-group is_inner1" style="display: block">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color: red">*</span>选择车牌号</label>
                        <div class="col-sm-10">
                            <select name="sku_id" >
                                {loop $sku $index $item}
                                <option value="{$item['id']}">{$item['carnum']}</option>
                                {/loop}
                            </select>
                        </div>
                    </div>
                    <div class="form-group is_inner2" style="display: none">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">外调车型名称<span style="color: red">*</span></label>
                        <div class="col-sm-10">
                            <input name="car_name" type="text"  class="form-control" placeholder="请输入外调车型名称" />
                        </div>
                    </div>
                    <div class="form-group is_inner2" style="display: none">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">外调车牌号<span style="color: red">*</span></label>
                        <div class="col-sm-10">
                            <input name="exterior_number" type="text"  class="form-control" placeholder="请输入外调车牌号" />
                        </div>
                    </div>
                    <div class="form-group is_inner2" style="display: none">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color: red">*</span>发车门店</label>
                        <div class="col-sm-10">
                            <select name="start_shop" >
                                {loop $store_list $index $item}
                                <option value="{$item['id']}">{$item['name']}</option>
                                {/loop}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">租金</label>
                        <div class="col-sm-10">
                            <input name="money" type="text"  class="form-control"  placeholder="请输入租金"/>
                        </div>
                    </div>
                    <div class="form-group" >
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">手续费</label>
                        <div class="col-sm-10">
                            <input name="fee" type="text"  class="form-control"  placeholder="请输入手续费"/>
                        </div>
                    </div>
                    <div class="form-group" >
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">押金</label>
                        <div class="col-sm-10">
                            <input name="deposit_money" type="text"  class="form-control"  placeholder="请输入押金" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color: red">*</span>客户姓名</label>
                        <div class="col-sm-10">
                            <input name="name" type="text"  class="form-control" placeholder="请输入客户姓名" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color: red">*</span>联系电话</label>
                        <div class="col-sm-10">
                            <input name="mobile" type="text"  class="form-control" placeholder="请输入联系电话"  />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">开始时间</label>
                        <div class="col-sm-10">
                            {php echo tpl_form_field_date('start_time','',true)}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">结束时间</label>
                        <div class="col-sm-10">
                            {php echo tpl_form_field_date('end_time','',true)}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">备注</label>
                        <div class="col-sm-10">
                            <textarea name="remark" class="form-control" cols="30" placeholder="请输入备注" rows="1"></textarea>
                        </div>
                    </div>
                </div>
        </div>
        <div class="form-group">
            <input type="submit" name="submit" value="提交订单" class="btn col-lg-3" style="color: white;background-color: #444444;margin-left: 550px;"/>
            <input type="hidden" name="token" value="{$_W['token']}" />
        </div>
    </form>
</div>
<script type="text/javascript">
    $(function(){
        $("#frame-2").show();
        $("#yframe-2").addClass("wyactive");
    })
    function check() {
        var a= $('input[name="is_inner"]:checked').val()
        console.log(a)
        if(a==1){
            $('.is_inner1') .show();
            $('.is_inner2') .hide();
        }else{
            $('.is_inner2') .show();
            $('.is_inner1') .hide();
        }
    }
</script>